package com.extr.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.extr.controller.domain.QuestionQueryResult;
import com.extr.domain.practice.PracticeRecord;
import com.extr.persistence.PracticeRecordMapper;
import com.extr.util.Page;

@Service("practiceRecordService")
public class PracticeRecordServiceImpl implements PracticeRecordService {

	@Autowired
	private PracticeRecordMapper recordMapper;
	@Override
	public void addRecord(PracticeRecord record) {
		// TODO Auto-generated method stub
		recordMapper.insert(record);
	}

	@Override
	public List<PracticeRecord> getPracticeRecordByTime(HashMap<String, Object> map, Page<PracticeRecord> page) {
		// TODO Auto-generated method stub
		return recordMapper.selectRecordByTime((String)map.get("startTime"), (String)map.get("endTime"), (String)map.get("userName"), page);
	}
}
